﻿using System;
using System.Collections.Generic;
using System.Text;
using NHibernate;
using Blazing.BusinessObjects.Tagging;
using System.BusinessObjects.Transactions;
using NHibernate.Criterion;

namespace Blazing.BusinessObjects.Queries
{
    public class QryFetchTaxonomyTagBySlug
    {
        public static ICriteria Query(string slug)
        {
            ICriteria qry = UnitOfWork.CurrentSession.CreateCriteria(typeof(TaxonomyTag));
            qry.Add(Expression.Eq("Slug", slug));

            qry.SetCacheable(true);
            return qry;
        }
    }
}
